<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: Bug2</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: Bug2</td>
      <td class="subheader-left"><a href="matlab:open Bug2">View code for Bug2</a></td>
    </tr>
  </table>
<h1>Bug2</h1><p><span class="helptopic">Bug navigation class</span></p><p>
A concrete subclass of the abstract Navigation class that implements the bug2
navigation algorithm.  This is a simple automaton that performs local
planning, that is, it can only sense the immediate presence of an obstacle.

</p>
<h2>Methods</h2>
<table class="list">
  <tr><td style="white-space: nowrap;" class="col1"> path</td> <td>Compute a path from start to goal</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> visualize</td> <td>Display the obstacle map (deprecated)</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> plot</td> <td>Display the obstacle map</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> display</td> <td>Display state/parameters in human readable form</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> char</td> <td>Convert to string</td></tr>
</table>
<h2>Example</h2>
<pre style="width: 90%%;" class="examples">
load&nbsp;map1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&nbsp;load&nbsp;the&nbsp;map
bug&nbsp;=&nbsp;Bug2(map);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%&nbsp;create&nbsp;navigation&nbsp;object
bug.goal&nbsp;=&nbsp;[50,&nbsp;35];&nbsp;&nbsp;%&nbsp;set&nbsp;the&nbsp;goal
bug.path([20,&nbsp;10]);&nbsp;&nbsp;&nbsp;%&nbsp;animate&nbsp;path&nbsp;to&nbsp;(20,10)
</pre>
<h2>Reference</h2>
<ul>
  <li>Dynamic path planning for a mobile automaton with limited information on the environment,,
V. Lumelsky and A. Stepanov,
IEEE Transactions on Automatic Control, vol. 31, pp. 1058-1063, Nov. 1986.</li>
  <li>Robotics, Vision & Control, Sec 5.1.2,
Peter Corke, Springer, 2011.</li>
</ul>
<h2>See also</h2>
<p>
<a href="Navigation.html">Navigation</a>, <a href="DXform.html">DXform</a>, <a href="Dstar.html">Dstar</a>, <a href="PRM.html">PRM</a></p>
<hr>
<a name="Bug2"><h1>Bug2.Bug2</h1></a>
<p><span class="helptopic">bug2 navigation object constructor</span></p><p>
<strong>b</strong> = <span style="color:red">Bug2</span>(<strong>map</strong>) is a bug2 navigation
object, and <strong>map</strong> is an occupancy grid, a representation of a
planar world as a matrix whose elements are 0 (free space) or 1
(occupied).

</p>
<h2>Options</h2>
<table class="list">
  <tr><td style="white-space: nowrap;" class="col1">'goal', G</td> <td>Specify the goal point (1x2)</td></tr>
  <tr><td style="white-space: nowrap;" class="col1">'inflate', K</td> <td>Inflate all obstacles by K cells.</td></tr>
</table>
<h2>See also</h2>
<p>
<a href="Navigation.Navigation.html">Navigation.Navigation</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2014 Peter Corke.</p>
</body></html>